package com.varian.tool.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import com.varian.tool.Func;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 * @author ben
 * @since 2024/7/1
 */
@Getter
@RequiredArgsConstructor
public enum UserStatusEnum implements BaseEnum<UserStatusEnum> {

    /**
     * 禁用
     */
    DISABLE(0),
    /**
     * 启用
     */
    ENABLE(1),
    ;
    @EnumValue
    @JsonValue
    final Integer value;

    @Override
    public UserStatusEnum convert(Integer value) {
        return Func.findBaseEnumByValue(values(), value);
    }
}
